﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Collections;

namespace DAO.DBSystem
{
    public class CEQuerys
    {        
        #region Querys

            public string dbQuery(string query)
            {
                string retorno = string.Empty;
                switch (query)
                {   
                    case "ObterSGBD":
                        retorno = "Select Banco From Tbl_Bancos Order by IdBanco";
                        break;
                    case "InserirStringConn":
                        retorno = @"Insert into Tbl_Conexao 
                                    Values (@idDb, @strConexao, @user, @senha, @serverName, @dataBase)";
                        break;
                    case "DeleteStringConn":
                        retorno = @"Delete From Tbl_Conexao";                                    
                        break;
                    case "ObterIdSGBD":
                        retorno = "Select IdBanco From Tbl_Bancos Where Banco = @banco";
                        break;
                    case "ObterNomeSGBD":
                        retorno = "Select Banco From Tbl_Bancos Where IdBanco = @idBanco";
                        break;
                    case "ObterConexao":
                        retorno = "Select * From Tbl_Conexao";
                        break;
                    default:
                        retorno = string.Empty;
                        break;
                }
                return retorno;
            }

        #endregion
    }
}
